aux_source_directory(. srcs)

include_directories(${CDEMO2_DIR}/include )

add_definitions(-DDLL_EXPORTS)

set(LIBRARY_OUTPUT_PATH "${cmakedemo2_BINARY_DIR}/bin")
#set(RUNTIME_OUTPUT_DIRECTORY "${cmakedemo2_BINARY_DIR}/bin")

message("cmakdedemo2->person:>>>>>>")
message("CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}")
message("LIBRARY_OUTPUT_PATH = ${LIBRARY_OUTPUT_PATH}")
message("RUNTIME_OUTPUT_DIRECTORY = ${RUNTIME_OUTPUT_DIRECTORY}")

# 之前的添加动态库/静态库的方法
# 缺点：动态库与静态库的名字不能重名
# add_library(person SHARED ${srcs})

# 生成动态库目标
add_library(person SHARED ${srcs})
# 生成静态库目标
#add_library(person_static STATIC ${srcs})

# 指定静态库的输出名称
#set_target_properties(person_static PROPERTIES OUTPUT_NAME "person")
# 使动态库和静态库同时存在
#set_target_properties(person PROPERTIES CLEAN_DIRECT_OUTPUT 1)
#set_target_properties(person_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)

# 指定动态库版本
# VERSION 动态库版本
# SOVERSION API版本
set_target_properties(person PROPERTIES VERSION 1.0 SOVERSION 1)

message("cmakdedemo2->person:<<<<<<")
